Fix isCommand check and set min rows threshold for saveToFile#6377
Fix isCommand check and set min rows threshold for saveToFile#6377turboFei wants to merge 5 commits intoapache:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6377 +/- ##
============================================
- Coverage 58.51% 58.48% -0.04%
Complexity 24 24
============================================
Files 653 653
Lines 39895 39916 +21
Branches 5482 5485 +3
============================================
- Hits 23345 23344 -1
- Misses 14055 14073 +18
- Partials 2495 2499 +4 ☔ View full report in Codecov by Sentry. |
|
thanks @wForget , updated |
|
|
||
| private def isCommandExec(nodeName: String): Boolean = { | ||
| def isCommandExec(result: DataFrame): Boolean = { | ||
| val nodeName = result.queryExecution.executedPlan.getClass.getName |
There was a problem hiding this comment.
result.queryExecution.executedPlan.nodeName?
There was a problem hiding this comment.
it is a bug and not covered by UT before.
There was a problem hiding this comment.
we have the method isCommandResultExec before, until we drop spark 3.1 support
There was a problem hiding this comment.
Since we have dropped support for Spark 3.1 in #6273, do we still need to adapt to it?
There was a problem hiding this comment.
it did not work for spark 3.5 as well
There was a problem hiding this comment.
it did not work for spark 3.5 as well
I mean we can simplify the logical to
result.queryExecution.executedPlan match {
case commandResult: CommandResultExec => true
case _ => false
}…eToFile # 🔍 Description ## Issue References 🔗 This pull request fixes # I found that, with saveToFile enabled with the default min size threshold, even I run a simple `set` command, It also save the result to file. <img width="1718" alt="image" src="https://github.com/apache/kyuubi/assets/6757692/5bcc0da1-201a-453a-8568-d1bfadd7adef"> I think we need to skip this kind of queries. ## Describe Your Solution 🔧 Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6377 from turboFei/check_is_DQL. Closes #6377 da9c2a9 [Wang, Fei] ut 04e20db [Wang, Fei] conf 8f20ed8 [Wang, Fei] refine the check f558dcc [Wang, Fei] ut c813403 [Wang, Fei] DQL Authored-by: Wang, Fei <fwang12@ebay.com> Signed-off-by: Wang, Fei <fwang12@ebay.com> (cherry picked from commit 3439ea0) Signed-off-by: Wang, Fei <fwang12@ebay.com>
|
thanks, merged to 1.9.1 |

🔍 Description
Issue References 🔗
This pull request fixes #

I found that, with saveToFile enabled with the default min size threshold, even I run a simple
setcommand, It also save the result to file.I think we need to skip this kind of queries.
Describe Your Solution 🔧
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Related Unit Tests
Checklist 📝
Be nice. Be informative.